package com.yixia.pea.domain.credit;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName pea_hz_fam
 */
@TableName(value ="pea_hz_fam")
@Data
public class PeaHzFam implements Serializable {
    /**
     * 家庭成员ID
     */
    @TableId(value = "fam_id", type = IdType.AUTO)
    private Long famId;

    /**
     *  户主ID
     */
    @TableField(value = "hz_id")
    private Long hzId;

    /**
     * 家庭成员姓名
     */
    @TableField(value = "fam_name")
    private String famName;

    /**
     * 家庭成员身份证号
     */
    @TableField(value = "fam_id_card_num")
    private String famIdCardNum;

    /**
     * 与户主的关系
     */
    @TableField(value = "fam_relation_ship")
    private String famRelationShip;

    /**
     * 劳动情况
     */
    @TableField(value = "fam_labor_condition")
    private String famLaborCondition;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PeaHzFam other = (PeaHzFam) that;
        return (this.getFamId() == null ? other.getFamId() == null : this.getFamId().equals(other.getFamId()))
            && (this.getHzId() == null ? other.getHzId() == null : this.getHzId().equals(other.getHzId()))
            && (this.getFamName() == null ? other.getFamName() == null : this.getFamName().equals(other.getFamName()))
            && (this.getFamIdCardNum() == null ? other.getFamIdCardNum() == null : this.getFamIdCardNum().equals(other.getFamIdCardNum()))
            && (this.getFamRelationShip() == null ? other.getFamRelationShip() == null : this.getFamRelationShip().equals(other.getFamRelationShip()))
            && (this.getFamLaborCondition() == null ? other.getFamLaborCondition() == null : this.getFamLaborCondition().equals(other.getFamLaborCondition()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFamId() == null) ? 0 : getFamId().hashCode());
        result = prime * result + ((getHzId() == null) ? 0 : getHzId().hashCode());
        result = prime * result + ((getFamName() == null) ? 0 : getFamName().hashCode());
        result = prime * result + ((getFamIdCardNum() == null) ? 0 : getFamIdCardNum().hashCode());
        result = prime * result + ((getFamRelationShip() == null) ? 0 : getFamRelationShip().hashCode());
        result = prime * result + ((getFamLaborCondition() == null) ? 0 : getFamLaborCondition().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", famId=").append(famId);
        sb.append(", hzId=").append(hzId);
        sb.append(", famName=").append(famName);
        sb.append(", famIdCardNum=").append(famIdCardNum);
        sb.append(", famRelationShip=").append(famRelationShip);
        sb.append(", famLaborCondition=").append(famLaborCondition);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}